home *** CD-ROM | disk | FTP | other *** search
/ Strategy Challenges Collection / Strategy Challenges Collection.iso / pc / demo / demodata / menu.dxr / 00026.ls < prev    next >
Encoding:
Text File  |  1996-10-02  |  1.3 KB  |  52 lines

  1. on enterFrame
  2.   global gBeenThere, gVoiceFlag
  3.   set the timeoutLapsed to 0
  4.   if gBeenThere = 0 then
  5.     repeat with nn = 4 to 6
  6.       puppetSprite(nn, 1)
  7.     end repeat
  8.     if gVoiceFlag = 0 then
  9.       puppetSound("SubMain.aif")
  10.       set gVoiceFlag to 1
  11.     end if
  12.     set gBeenThere to 1
  13.   end if
  14. end
  15.  
  16. on exitFrame
  17.   timeOutCheck()
  18.   go(the frame)
  19.   SubmenuRoll()
  20. end
  21.  
  22. on SubmenuRoll
  23.   if the mouseCast > 1 then
  24.     set tempName to the name of cast the mouseCast
  25.     if tempName contains "_Roll" then
  26.       nothing()
  27.     else
  28.       repeat with nn = 4 to 6
  29.         if the castNum of sprite nn < 1 then
  30.           next repeat
  31.         end if
  32.         if the name of cast the castNum of sprite nn contains "_Roll" then
  33.           set tempOld to the name of cast the castNum of sprite nn
  34.           set tempOld to chars(tempOld, 1, length(tempOld) - 5)
  35.           set the castNum of sprite nn to the number of member tempOld
  36.           exit repeat
  37.         end if
  38.       end repeat
  39.       repeat with nn = 4 to 6
  40.         if the castNum of sprite nn < 1 then
  41.           next repeat
  42.         end if
  43.         if the name of cast the castNum of sprite nn = tempName then
  44.           set the castNum of sprite nn to the number of member (tempName & "_Roll")
  45.           exit repeat
  46.         end if
  47.       end repeat
  48.     end if
  49.   end if
  50.   updateStage()
  51. end
  52.